package com.jinsp.networklibrary;

import android.support.test.runner.AndroidJUnit4;

import com.jinsp.networklibrary.util.AESUtils;

import org.junit.Test;
import org.junit.runner.RunWith;

import java.io.UnsupportedEncodingException;

/**
 * Instrumented test, which will execute on an Android device.
 *
 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
 */
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
    @Test
    public void useAppContext() throws UnsupportedEncodingException {
//        AESUtils.init("vefx21evuym2cｸ", "utf-8");
        AESUtils.init("Ji@n123sp^", "utf-8");
//        String str = "ryIaoE5IqNE8lhH0dmyltXdV+2ev8GLtKeYEtJs57zyxmur8Q64X0gCBmHJggCAILxw1AiMk/He3dv1aKGy5SQrE+7V1j1ysj8EzRXVzMCSwmxxGg76GHm69pApTuA6EjQskmwq0y5vz/DWX5e537oYbxSRTZU0rbvhPBmroTmAHdRGpCzufSD0IcqUQbMZhsLhySQMvAmvozX2v7h2wq5W5POISXSQ4xehXkkj7U/GAy8VzCiotqdASr3jnHkrwVJRgn2ivON73eVp5SvrLQpokxsKRWHrZxovi+XSGgd+fzgHT07T1UDUDmonwGn3l7for+bOSAypGzVfmfzEmgA==";
//        String decryptString = AESUtils.decryptString(str);
//        System.out.println(decryptString);
        byte[] bytes = AESUtils.decryptByteArray("\u0002闐藧觞\uE6C4垆L埠\f\u00193\u0001擒籬幈冼潤鞊".getBytes("utf-8"));
        System.out.println(new String(bytes, "utf-8"));
    }
}